package Java8实战._2_Stream_使用流._6_数值流;

import java.util.stream.IntStream;

public class _2_数值范围 {

    public static void main(String[] args) {
        long count = IntStream.rangeClosed(1, 100)
                .filter(i -> i % 2 == 0)
                .count();
        System.out.println("rangeClosed：" + count);

        long count1 = IntStream.range(1, 100)
                .filter(i -> i % 2 == 0)
                .count();
        System.out.println("range：" + count1);
    }
}
